vcRoutingRule

vcRoutingRule allows you to define rules for transferring components to different connectors, thereby simulating routing rules for material flow.

See in: Overview

Module: vcBehaviors

Parent: vcContainer

Children -

Referenced by: -

Properties

Learn how to use properties here. The properties are also inherited from the parent class.

NameTypeAccessDescription
FlowProxyvcComponentFlowProxyRWGets or sets if a proxy is used to check capacity of selected connector before routing a component.
If None, this property is ignored.
RuleComponentvcRoutingComponentMethodRWGets or sets the component method used for rule processing.

Methods

Learn how to use methods here. The methods are also inherited from the parent class.

NameReturn TypeParametersDescription
createConnectorIntegerNoneAdds a new connector in routing rule.

Returns:
int: Index of the new connector.
deleteConnectorNoneInteger indexDeletes a connector from routing rule.
See more
Parameters:
index (int): Index of the connector to delete from list.

Exceptions:
IndexError: When given index is out of bounds.
processRouteIntegerInteger fromConnectorIndex,
vcComponent component,
vcFlow OR None flowBehavior
Returns the result of a routing test to verify if a given component would be routed based on a capacity test performed by a given vcFlow behavior.
See more
Depending on the value of RuleComponent, the component can be either:
The arriving component (if RuleComponent == VC_ROUTING_PROCESSED)
The owner component of the behavior (if RuleComponent == VC_ROUTING_OWNER)

Parameters:
fromConnectorIndex (int): The index of the connector from which to route.
component (vcComponent): Component to verify routing with.
flowBehavior (vcFlow): Flow behavior to use for the check.

Returns:
int: -1 when no valid targets are found.
setTargetNoneInteger indexSets the connector by index for routing a component, which should be executed in OnRoute event.

Parameters:
index (int): The index of the connector.

Events

Learn how to use events here. The events are also inherited from the parent class.

NameParametersDescription
OnRouteint connector,
vcComponent component,
vcFlow flow
Triggered when a component is transferred into routing rule and being processed.
Use the processRoute() method to test a viable option, and then use setTarget() method to override default routing logic.
See more
Parameters:
connector (int): Index of the connector used.
component (vcComponent): The component being processed.
flow (vcFlow): Behavior used to perform a capacity test.